Time of flight camera

ABSTRACT

A CW-TOF camera that uses a piecewise constant or linear discretized indicator function of first and second modulation frequencies of light that the camera transmits to illuminate a scene and a round trip time t R  for light from and back to the camera for features in the scene to disambiguate wrapped phase shifts that the camera acquires for the features.

BACKGROUND

A “continuous wave” time of flight (TOF) camera (CW-TOF), transmits anamplitude modulated “continuous wave” of electromagnetic radiation,optionally IR light, having intensity that is typically periodicallymodulated to illuminate a scene that the camera images. Light reflectedfrom the transmitted light by a feature in the scene reaches the cameraas a wave of reflected light having a same modulation as the transmittedlight but shifted in phase by a phase shift, “φ”. The camera images thereflected light on a pixel or pixels of a photosensor and controlsexposure periods of the photosensor so that a pixel imaging the featureaccumulates an amount of charge responsive to a cross-correlation of theexposure periods and the reflected light that is a function of phaseshift φ.

SUMMARY

An aspect of an embodiment of the disclosure relates to providing aCW-TOF camera that illuminates a scene with first and second light waveshaving their intensities modulated at first and second modulationfrequencies f₁ and f₂ respectively to acquire a wrapped phase shift fora feature in the scene for each of the modulation frequencies. TheCW-TOF camera unwraps at least one of the wrapped phase shifts todetermine a wrapping number n for the at least one wrapped phase shiftand therefrom a distance to the feature responsive to a piecewiseconstant or linear, “indicator” function. The indicator function is afunction of a round trip time t_(R) of light from the CW-TOF camera tothe feature and back to the camera and is optionally discontinuous atboundaries of domains of adjacent pieces of the function. The functionassumes values in substantially non-overlapping ranges of values forroundtrip times in domains of adjacent pieces of the indicator function,and may be referred to as a “discretized indicator function” (DIN, orDIN function). A value of the DIN function along a constant or linearpiece of the DIN function is referred to generically as a discretizedindicator value, or DIN value. For wrapped phase shifts for a samemodulation frequency, different wrapping numbers associated with roundtrip times in domains of adjacent pieces of the DIN function areindicated by different DIN values.

To determine a wrapping number for the at least one wrapped phase shift,the CW-TOF camera processes the first and second wrapped phase shifts toprovide a value, which may be referred to as a “trial indicator”, whichin the absence of error in the wrapped phase shifts is, optionally,equal to a DIN value of the DIN function. The CW-TOF camera determines amost probable DIN value for the feature responsive to the trialindicator, and therefrom a wrapping number of the at least one wrappedphase shift and the distance to the feature.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

BRIEF DESCRIPTION OF FIGURES

Non-limiting examples of embodiments of the disclosure are describedbelow with reference to figures attached hereto that are listedfollowing this paragraph. Identical features that appear in more thanone figure are generally labeled with a same label in all the figures inwhich they appear. A label labeling an icon representing a given featureof an embodiment of the disclosure in a figure may be used to referencethe given feature. Dimensions of features shown in the figures arechosen for convenience and clarity of presentation and are notnecessarily shown to scale.

FIG. 1A schematically shows a CW-TOF camera transmitting first andsecond light waves having intensities continuously modulated atrespectively first and second different modulation frequencies toilluminate a scene and determine distances to features in the sceneresponsive to a DIN, in accordance with an embodiment of the disclosure;

FIG. 1B shows graphs illustrating relationships of the first and secondfrequencies to the DIN and its discrimination values in accordance withan embodiment of the disclosure; and

FIG. 2 shows a flow chart of a process by which the CW-TOF camera shownin FIG. 1A unwraps wrapped phase shifts and determines distances tofeatures in the scene, in accordance with an embodiment of thedisclosure.

DETAILED DESCRIPTION

In the discussion below features of a CW-TOF camera, in accordance withan embodiment of the disclosure are discussed with reference to FIG. 1A.The figure schematically shows the CW-TOF camera imaging a scene withlight that the camera transmits to illuminate the scene, and graphicallyillustrates features of phase shifts of light reflected from thetransmitted light that reaches the camera from different features in thescene.

The phase shift of light reflected by a given feature in the scene fromthe transmitted light back to the CW-TOF camera is equal to 2π times theround trip time to and back from the feature divided by the modulationperiod of the transmitted light. In symbols, φ=4πdf/c=2πft_(R),=2πt_(R)/T where “d” is a distance of the feature from the camera, “f”is the frequency of modulation, “T” is the period of the modulation, “c”is the speed of light, and t_(R) is the round trip time. The CW-TOFcamera determines a “wrapped” phase shift, φ′, from charge accumulatedby a pixel in the camera photosensor that images the given featureresponsive to reflected light from the feature that is incident on thepixel. However, the wrapped phase shift for the feature is the realphase shift φ modulo 2π and as a result is the same to within amultiplicative constant for a distance d of the feature from the cameraand for a distance (d+nc/2f) from the camera, where n is any integerequal to or greater than 1. The wrapped phase shifts acquired by theCW-TOF camera are therefore ambiguous with respect to distances from theCW-TOF camera, and a given wrapped phase shift may for example refer toa distance (d+nc/2f) for any n equal to or greater than 0. In accordancewith an embodiment of the disclosure, the CW-TOF camera thereforeunwraps the wrapped phase for the given feature to determine a wrappingnumber n for the wrapped phase and from the wrapping number thecorresponding real phase φ and a distance d to the feature.

FIG. 1A shows a graph of a DIN(t_(R)) function that a processorcomprised in the CW-TOF camera uses to distinguish wrapping numbers ofwrapped phases of light reflected from features in the scene inaccordance with an embodiment of the disclosure. FIG. 1B shows graphsthat detail form of a DIN(t_(R)) and how it may be used to determinewrapping numbers, in accordance with an embodiment of the disclosure.FIG. 2 shows a flow diagram of an algorithm for unwrapping phase shiftsof reflected light from features in a scene and determining distances tothe features responsive to the unwrapped phase shifts in accordance withan embodiment of the disclosure.

Hereinafter, a wrapped phase shift may be denoted by a primed symbol andits corresponding unwrapped, or real phase shift by the unprimed symbol.A real phase shift for a given modulation frequency f and a givenfeature in a scene may be referred to as a physical phase shift, isequal to 2πft_(R)=4πdf/c. A range of distances 0≦d<c/2f, for which aphase shift wrapping number n is equal to zero is said to be a range forwhich a CW-TOF camera provides unambiguous phase shifts may be referredto as an unambiguous depth range of the CW-TOF camera. The unambiguousdepth range has a maximum, unambiguous, range equal to c/2f.

In the discussion, unless otherwise stated, adjectives such as“substantially” and “about” modifying a condition or relationshipcharacteristic of a feature or features of an embodiment of thedisclosure, are understood to mean that the condition or characteristicis defined to within tolerances that are acceptable for operation of theembodiment for an application for which it is intended. Unless otherwiseindicated, the word “or” in the description and claims is considered tobe the inclusive “or” rather than the exclusive or, and indicates atleast one of, or any combination of items it conjoins.

FIG. 1A schematically shows a CW-TOF camera 20 operating to determinedistances to features in a scene 30 having objects 31 and 32, inaccordance with an embodiment of the disclosure. CW-TOF camera 20, whichis represented very schematically, comprises an optical systemrepresented by a lens 21, and a photosensor 22 having pixels 23 on whichthe lens system images scene 30. The CW-TOF camera optionally comprisesa light source 26 and a controller 24 that controls light source 26 andoptionally photosensor 22. Controller 24 controls light source 26 toilluminate scene 30 with continuously modulated light from whichfeatures in the scene reflect light back to CW-TOF camera 20. Thecontroller controls pixels 23 to register the reflected light to providedata for determining wrapped phase shifts for features in scene 30 andtherefrom distances to the features. A processor 25 receives the datathat pixels 23 provide and processes the data to acquire and processwrapped phase shifts for features in scene 30 in accordance with anembodiment of the disclosure as described below to determine distancesto the features.

A pixel in a camera photosensor, such as a pixel 23 in photosensor 22,registers incident light by accumulating positive or negative electriccharge, also referred to as “photocharge”, provided by electron-holepairs generated by photons in the incident light. Circuitry in the TOFcamera converts photocharge accumulated by the pixels into voltages thatare used as measures of the amounts of photocharge they respectivelyaccumulate. A set of voltages representing the accumulated photochargesand corresponding amounts of light registered by the pixels may bereferred to as a “frame” of the photosensor. Acquiring a frame of aphotosensor may be referred to as “reading” the photosensor, reading thepixels, or reading the photocharge in the pixels. An amount of lightthat a pixel registers may refer to an amount of optical energy incidenton the pixel, an amount of photocharge accumulated by a pixel responsiveto incident light, or to a voltage generated responsive to theaccumulated photocharge.

Photosensor 22 may be any photosensor controllable by controller 24 toregister light reflected by features in scene 30 and thereby providedata sufficient to determine the wrapped phase shifts and therefromdistances to the features, in accordance with an embodiment of thedisclosure. For each modulation frequency, controller 24 may by way ofexample, control exposure periods of pixels 23 in photosensor 22 tosample and register reflected light incident on the pixels at a samplingfrequency equal to the modulation frequency of the transmitted light foreach of a plurality of fixed sampling “phase offsets” relative to themodulation of the transmitted light. An amount of light from a givenfeature in scene 30 registered by a pixel in photosensor 22 for each ofthe phase offsets is proportional to a cross-correlation of thereflected light from the given feature with the exposure periods of thephotosensor for the sampling phase offset. Optionally, CW-TOF camera 20may use four offset phases, equal respectively to 0, π/2, π, and 3/2π todetermine the wrapped phase shift φ′ and therefrom distance d to afeature in a scene that the CW-TOF camera images. Let Q1, Q2, Q3, and Q4respectively represent amounts of photocharge accumulated forcross-correlations of reflected light from the feature and exposureperiods of pixels in the photosensor for the four sampling phaseoffsets. The phase shift φ′ may then be determined from an expressionφ′=arctan [(Q3−Q4)/(Q1−Q2)].

To acquire the four photocharge accumulations Q1, Q2, Q3, and Q4, forfeatures in scene 30 each feature may by way of example, simultaneouslybe imaged on four adjacent pixels 23 of photosensor 22, each of whichcontroller 24 controls to acquire a photocharge accumulationrepresenting a cross-correlation for a different one of the foursampling phase shifts. Optionally, controller 24 controls CW-TOF camera20 to image scene 30 four times, once for each sampling phase offset, toprovide four frames of its photosensor 22 to acquire the fourphotocharges Q1, Q2, Q3, and Q4 for features in the scene. By way of yetanother example, pixels 23 that photosensor 22 controls may be CMOSsmart pixels configured as photonic mixer devices (PMDs), each of whichcontroller 24 controls to register reflected light from a feature ofscene 30 at a plurality of different offset phases. The controller mayread the light registered by the PMD pixels in a single frame ofphotosensor 22.

It is noted that whereas controller 24 and processor 25 areschematically indicated in FIG. 1A as separate modules, they may beprovided by a same single module and/or any combination of suitableprocessing circuitry. Controller 24 and processor 25 may, compriseand/or have any of their respective functionalities provided by anycombination of suitable circuitry such as by way of example,microprocessors, microcontrollers, application specific integratedcircuits (ASICs), field programmable gate arrays (FPGA), multichipmodule (MCM) and/or system on a chip (SOC).

In an embodiment of the disclosure, controller 24 controls light source26 to transmit light having intensity modulated at a first frequency f₁to illuminate scene 30 and light modulated at a second, higher frequencyf₂, to illuminate the scene. Light transmitted by light source 26modulated at the first, lower frequency f₁ is schematically representedby a solid “harmonically” modulated line labeled 40 with frequency f₁shown in parenthesis. Modulated line 40 has a relatively largemodulation wavelength to visually indicate that it is associated withthe lower frequency modulation. Light transmitted by light source 26modulated at frequency f₂ is schematically represented by a solid“harmonically” modulated line labeled 50 with frequency f₂ shown inparenthesis. Modulated line 50 has a relatively small modulationwavelength to visually indicate that it is associated with the higherfrequency modulation.

Light reflected from transmitted light waves 40 and 50 back to CW-TOFcamera 20 by features in scene 30 is imaged on pixels 32 of photosensor22 by lens 21 to determine phase shifts for the reflected light that maybe used to determine distances to the features in accordance with anembodiment of the disclosure. The phase shifts are determined for eachmodulation frequency f₁ and f₂ optionally relative to a phase of themodulation of the transmitted light at times at which the reflectedlight reaches photosensor 22.

In FIG. 1A light reflected from transmitted light 40 and 50 by lightsource 26 to illuminate scene 30 is schematically shown for two featuresin the scene, features 131 and 132 of objects 31 and 32 respectively.Light reflected by feature 131 from lower frequency transmitted light 40and higher frequency transmitted light 50 is schematically represented,by dotted lines 41 and 51 having directional arrows pointing towardscamera 20. Lines 41 and 51 have relatively large and relatively smallmodulation wavelengths respectively, to indicate that they representreflected light modulated at lower and higher modulation frequencies f₁and f₂. Similarly, light reflected by feature 132 from transmitted light40 and 50 by feature 132 is schematically represented by dotted lines 42and 52 respectively having directional arrows pointing towards camera20. Lines 42 and 52 are shown having relatively small and relativelylarge modulation wavelengths to indicate their respective associationwith the lower and higher modulation frequencies f₁ and f₂.

Light from features 131 and 132 is imaged by lens 21 on pixels 23distinguished by labels 231 and 232 respectively, and reflected light 41and 42 from features 131 and 132 incident on the pixels is respectively,schematically indicated by dotted lines, also labeled 41 and 42, thatextend from lens 21 toward pixels 231 and 232. Reflected light 51 and 52from features 131 and 132 is also imaged on pixels 231 and 232respectively but is not schematically shown imaged on the pixels toreduce clutter of the figure.

Modulation of transmitted light 40 at frequency f₁, and phase oftransmitted light 40 transmitted at times at which reflected light 41and 42 reach pixels 131 and 132 is schematically indicated by solid“harmonic” lines 40* at the pixels. A real phase shift, φ(131,f₁),between modulation phase of transmitted light 40 modulated at modulationfrequency f₁ and reflected light 41 due to a round trip time from lightsource 26 to feature 131 and back to camera 20 is schematicallyindicated at pixel 231 by a distance between witness lines labeledφ(131,f₁). Similarly, a real phase shift φ(132,f₁) between modulationphase of transmitted light 40 and reflected light 42 due to a round triptime from light source 26 to feature 132 and back to camera 20 isschematically indicated at pixel 132 by a distance between witness lineslabeled φ(132,f₁). Phase shifts φ(131,f₁) and φ(132,f₁) and theirassociated witness lines are schematically shown in a same column oneabove the other for clarity of presentation and ease of comparison in aninset 100.

By way of example, feature 132 is assumed to be farther from CW-TOFcamera 20 by a distance Δd₁=c/2f₁. As a result, φ(132,f₁) is greaterthan φ(131,f₁) by 2π as shown in inset 100. However, photocharge that agiven pixel of a CW-TOF camera accumulates responsive to across-correlation of the camera's exposure periods with reflected lightfrom a feature in a scene that the pixel images is the same to within amultiplicative constant for a distance d of the feature from the cameraand for a distance (d+nc/2f) from the camera, where n is any integerequal to or greater than 1. As a consequence, a CW-TOF camera maps realphase shifts φ=(4πdf/c+n2π) corresponding to distances (d+nc/2f) offeatures in a scene to wrapped phase shifts φ′=4πdf/c corresponding todistances 0≦d<c/2f. The wrapped phase shifts acquired by the CW-TOFcamera are therefore ambiguous with respect to distances from the CW-TOFcamera, and a given wrapped phase shift may for example refer to adistance (d+nc/2f) for any n equal to or greater than 0. CW-TOF camera20 therefore maps real phase shifts φ(132,f₁) and φ(131,f₁) to wrappedphase shifts φ′(132,f₁) and φ′(131,f₁) respectively, which are less than2π and, for the assumed circumstances of features 131 and 132, equal.Without unwrapping, φ′(132,f₁) and φ′(131,f₁), even though they aregenerated from different real phase shifts are not distinguished by aCW-TOF camera. The wrapped phase shifts are ambiguous, and distancesdetermined responsive to the phase shifts are determinate only to withinan integer multiple of distance Δd₁.

Phase shifts φ(131,f₂) and φ(132,f₂) between modulation phase oftransmitted light 50 modulated at modulation frequency f₂ and phase ofreflected light 51 and 52 from features 131 and 132 respectively atpixels 231 and 232 are also schematically shown in a same column, oneabove the other in inset 100. Phase of transmitted light 50 for times atwhich reflected light 51 and 52 reach pixels 231 and 232 isschematically represented by solid harmonic lines 50* in inset 100.Whereas phase shifts φ(131,f₂) and φ(132,f₂) are larger than phaseshifts φ(131,f₁) and φ(132,f₁) respectively because f₂ is larger thanf₁, phase shifts φ(131,f₂) and φ(132,f₂) are mapped to wrapped phaseshifts φ′(131,f₂) and φ′(132,f₂), both of which are less than 2π.Wrapped phase shifts φ′(131,f₂) and φ′(132,f₂), similarly to wrappedphase shifts φ′(131,f₁) and φ′(132,f₁), are ambiguous with respect todistances of features 131 and 132 from camera 20 and without unwrapping,distances determined responsive to the wrapped phase shifts areindeterminate to within an integer multiple of Δd₂=c/2f₂.

To unwrap phase shifts for reflected light at modulation frequency f₁and/or modulation frequency f₂ acquired by CW-TOF camera 20 for afeature, such as feature 131 or feature 132, in scene 30 and determine adistance to the feature, in accordance with an embodiment of thedisclosure, processor 25 processes the phase shifts to provide a trialindicator for a DIN function of the phase shifts. Processor 25determines a DIN value and therefrom a wrapping number for at least oneof the phase shifts acquired for the feature responsive to the trialindicator and the DIN, and uses the wrapping number to determine anunwrapped phase shift for the feature and therefrom a distance to thefeature.

Let φ*(t_(R),f₁) represent a “theoretical” wrapped phase shift forreflected light from a feature in scene 30 for light modulated atfrequency f₁ and a distance of the feature from CW-TOF camera 20 forwhich a round trip time of light to the feature and back to the camerais equal to “t_(R)”. The theoretical wrapped phase shift is equal to areal phase shift φ for t_(R) modulo 2π. Let φ*(t_(R),f₂) represent thetheoretical wrapped phase shift of the feature for light modulated atmodulation frequency f₂. In an embodiment of the disclosure, adiscretized DIN function for CW-TOF camera 20 that processor 25 uses tounwrap wrapped phase shifts acquired by CW-TOF camera 20 for features ofscene 30 may be defined by an expression of the formDIN(t_(R))=(αφ*(t_(R),f₁)−βφ*(t_(R),f₂)) where α and β are constantsthat optionally have a same sign.

In an embodiment, β/α=f₁/f₂ and DIN(t_(R))=φ*(t_(R),f₁)−(f₁/f₂)φ*(t_(R),f₂). By choosing β/α=f₁/f₂ in accordance with an embodiment ofthe disclosure DIN(t_(R)) is a function substantially only of thewrapping numbers of φ*(t_(R),f₁) and φ*(t_(R),f₂) and assumes discreteDIN values separated by integer multiples of a phase differenceΔφ=2π(f₂−f₁)/f₂.

The piecewise constant step function form of DIN(t_(R)) and differencesbetween steps of the function may be demonstrated by noting that for asame round trip time t_(R), real phase shifts φ(t_(R),f₁) andφ(t_(R),f₂) for a given feature in scene 30 have a ratioφ(t_(R),f₁)/φ(t_(R),f₂)=(f₁/f₂). A theoretical wrapped phase shiftφ*(t_(R),f₁) may be written φ*(t_(R),f₁)=(φ(t_(R),f₁)−n₁2π), where n₁ isa wrapping number that relates the real phase shift φ(t_(R),f₁) to itstheoretical wrapped phase shift φ*(t_(R),f₁). Similarlyφ*(t_(R),f₂)=(φ(t_(R),f₂)−n₂2π) where n₂ is a wrapping number thatrelates real phase shift φ(t_(R),f₂) to theoretical wrapped phase shiftφ*(t_(R),f₂). DIN(t_(R)) may therefore be expressed asDIN(t_(R))=[φ(t_(R),f₁)−n₁2π]−(f₁/f₂)[φ(t_(R),f₂)−n₂2π], which may berewritten DIN(t_(R))=[φ(t_(R),f₁)−(f₁/f₂)φ(t_(R),f₂)]−2π((n₁−(f₁/f₂)n₂).Since φ(t_(R),f₁)/φ(t_(R),f₂)=(f₁/f₂) the expression for DIN(t_(R))reduces to DIN(t_(R))=2π[(f₁/f₂)n₂−n₁]. Let Δn=(n₂−n₁). ThenDIN(t_(R))=Δn(2π−Δφ)−n₁Δφ. The last expression for DIN(t_(R)) shows thatDIN(t_(R)) is, to within the constant coefficient 2π a function ofwrapping numbers n₁ and n₂ (Δn=(n₂−n₁)) and assumes discrete DIN valuesseparated by integer multiples of the phase difference Δφ=2π(f₂−f₁)/f₂.

In an embodiment, f₁/f₂=M/(M+1), Δn is either equal to 0 or 1 andDIN(t_(R)) has interleaved positive and negative values. Consecutivepositive values differ by Δφ and consecutive negative values differ byΔφ. DIN(t_(R)) is cyclical, repeating itself every M₂=2π/Δφ=f₂/(f₂−f₁)periods of the high, f₂, modulation frequency of transmitted light wave50, and every M₁=2π/Δφ−1=f₁/(f₂−f₁) periods of the low, f₁, modulationfrequency of transmitted light wave 40. Different wrapping numbers forwrapped phase shift φ*(t_(R),f₁), from and inclusive of zero, up to andinclusive of a maximum wrapping number (M₁−1) are associated withdifferent DIN values of DIN(t_(R)). Similarly, different wrappingnumbers for wrapped phase shift φ*(t_(R),f₂), from and inclusive ofzero, up to and inclusive of a maximum wrapping number (M₂−1) areassociated with different DIN values of DIN(t_(R)). A graph ofDIN(t_(R)) for f₁/f₂=⅘ is shown in processor 25 of FIG. 1A and also inFIG. 1B discussed below. In the graph, steps in DIN(t_(R)) are labeledwith their respective DIN values and step size Δφ of the DIN values isindicated.

Processor 25 determines a trial indicator for use with DIN(t_(R)) todetermine a distance to a feature in scene 30 from wrapped phase shiftsfor modulation frequencies f₁ and f₂ acquired by CW-TOF camera 20responsive to light reflected by the feature from transmitted light wave40 and transmitted light wave 50. If a trial indicator for a feature inscene 30 for frequencies f₁ and f₂ is represented by “x₁₂(k)”, where “k”is an index identifying the feature, and wrapped phase shifts for thefeature for light reflected by the feature from light waves 40 and 50are represented by φ′(k,f₁) and φ′(k,f₂), then x₁₂(k) is optionallydetermined from an expression x₁₂(k)=φ′(k,f₁)−(f₁/f₂)φ′(k,f₂). Theprocessor optionally compares the trial indicator to DIN(t_(R)) todetermine a phase shift for a wrapped phase shift for the feature andtherefrom a distance to the feature.

For example, for features 131 and 132 imaged on pixels 231 and 232,trial indicators may be written x₁₂(131)=φ′(131,f₁)−(f₁/f₂)φ′(131,f₂)and x(132)=φ′(132,f₁)−(f₁/f₂)φ′(132,f₂). The expressions for x₁₂(131)and x₁₂(132) are shown in FIG. 1A in processor 25. As schematicallyindicated in inset 100, real phase shifts φ(131,f₁) and φ(131,f₂) areboth less than 2π. As a result, the wrapping numbers n₁ and n₂ of theirrespective wrapped phase shifts φ′(131,f₁) and φ′(131,f₂) are both equalto zero and a ratio their respective theoretical phase shiftsφ*(132,f₁)/φ*(132,f₂) is equal to (f₁/f₂). Were wrapped phase shiftsφ′(131,f₁) and φ′(131,f₂) determined with zero error, they would beequal respectively to their theoretical phase shifts φ*(132,f₁) andφ*(132,f₂), and trial indicator x₁₂(131) would be equal to zero. Realphase shifts φ(132,f₁) and φ(132,f₂) are indicated in inset 100 havingvalues between 2π and 4π. Wrapped phase shifts φ′(132,f₁) and φ′(132,f₂)corresponding to real phase shifts φ(132,f₁) and φ(132,f₂) thereforehave wrapping numbers n₁ and n₂ respectively equal to 1. Were wrappedphase shifts φ′(132,f₁) and φ′(132,f₂) determined with zero error, theywould be equal respectively to their theoretical phase shiftsφ*(132,f₁)=[φ(132,f₁)−2π] and φ*(132,f₂)=[φ(132,f₂)−2π]. Their trialindicator x(132) would be equal tox(132)=[φ(132,f₁)−2π]−(f₁/f₂)[φ(132,f₂)−2π]=[φ(132,f₁)−(f₁/f₂)φ(132,f₂)]−2π[1−(f₁/f₂)]=−Δφ.

However, because in practice phase shift measurements are not performedwithout error, trial indicators x₁₂(131) and x₁₂(132) are not exactlyequal to 0 and −Δφ respectively, but are biased by errors. Values oftrial indicators x₁₂(131) and x₁₂(132), which are schematicallyrepresented by solid dots 141 and 142 along the ordinate of the graph ofDIN(t_(R)) in processor 25, are therefore indicated in the graph, by wayof example, as displaced along the ordinate from their error freevalues.

Whereas values for trial indicators x₁₂(131) and x₁₂(132) are not errorfree, and are not equal to their error free values, processor 25determines, using any of various suitable criteria, that x₁₂(131) andx₁₂(132) are closest to, and should be associated with, DIN values 0 and−Δφ. DIN value 0 is associated with wrapping numbers n₁=0 and n₂=0. DINvalue −Δφ is associated with wrapping numbers n₁=1 and n₂=1respectively. As a result, processor 25 assigns wrapped phase shiftsφ′(131,f₁) and φ′(131,f₂) wrapping numbers equal to zero and wrappedphase shifts φ′(132,f₁) and φ′(132,f₂) wrapping numbers equal to one.The processor uses at least one wrapped phase and its associatedwrapping number acquired for each feature 131 and 132 to determine adistance to the feature. For example, processor 25 may determinedistance d₁₃₁ to feature 131 from an expression d₁₃₁=φ′(131,f₁)c/4πf₁,and distance d₁₃₂ to feature 132 from an expressiond₁₃₂=[φ′(132,f₂)+2π]c/4π f₂.

FIG. 1B shows a graph 200 that illustrates relationships betweenmodulation frequencies f₁, f₂, DIN(t_(R)) and wrapping numbers forwrapped phase shifts acquired by CW-TOF camera 20 for features in scene30, in accordance with an embodiment of the disclosure. The graph hasthree round trip time axes 201, 202, and 203 along which round triptimes t_(R) to features in scene 30 are indicated as measured. Roundtrip axes 201, 202, and 203 are calibrated and aligned to each other,and same round trip times t_(R) on any two of the axes are homologous.

Solid and dashed phase shift graph lines φ₁ and φ₂ along round trip axis201 indicate real phase shifts for features in scene 30 as functions oft_(R) for reflected light at modulation frequencies f₁ and f₂respectively. Values of real phase shifts for points along real phaseshift graph lines φ₁ and φ₂ corresponding to round trip times t_(R)along round trip axis 201 are shown along an ordinate, phase shift axis204. Values of wrapped phase shifts along phase shift axis 204 areprimed. Values of real phase shifts are unprimed. Round trip timest_(R)(131) and t_(R)(132) for features 131 and 132 in scene 30 (FIG. 1A)respectively are indicated along round trip time axis 201. Points onphase shift graph lines φ₁ and φ₂ corresponding to round trip timest_(R)(131) and t_(R)(132) are indicated by intersection points of thephase shift graph lines with lines parallel to ordinate axis 204 thatpass through the round trip times. The intersection points areemphasized by solid circles and their corresponding real phase shiftsφ(132,f₂), φ(132,f₁), φ(131,f₂), and φ(131,f₁) are labeled along phaseshift axis 204.

Because photosensor 22 (FIG. 1A) provides data that defines real phaseshifts for light modulated at modulation frequencies f₁ and f₂ modulo2π/f₁ and 2π/f₂ respectively, real phase shifts that are greater than 2πrepresented by points on phase shift graph lines φ₁ and φ₂ are mapped towrapped phase shifts represented by projections of the points on graphlines φ₁ and φ₂ to points on saw-tooth phase shift graph lines φ′₁ andφ′₂ respectively. As a result, every real phase shift greater than 2πalong phase shift graph line φ₁ and φ₂ is mapped to a wrapped phaseshift of a “phase tooth” of saw-tooth phase shift lines φ′₁ and φ′₂respectively, and is less than 2π.

Phase teeth in saw-tooth phase shift graph line φ′₁ are numbered bynumbers m₁ shown in solid line ellipses. Phase teeth in saw-tooth phaseshift graph line φ′₂ are numbered by numbers m₂ shown in dotted lineellipses. In FIG. 1B, as in FIG. 1A, f₁/f₂ is assumed to be equal to ⅘.As a result, Δφ=2π(f₂−f₁)/f₂=2π/5 and saw-tooth graph line φ′₂ hasM₂=2π/Δφ=5 teeth (1≦m₂≦M₂) and saw-tooth graph line φ′₁ has M₁=2π/Δφ−1=4teeth (1≦m₁≦M₁) before their pattern of saw teeth repeat.

An m₁-th phase tooth in saw-tooth phase shift graph line φ′₁ maps a realphase shift for modulation frequency f₁ along phase shift graph line φ₁between a real phase shift equal to 2π(m₁−1) and a real phase shift lessthan 2πm₁ to an ambiguous, wrapped phase shift having a wrapping numbern=(m₁−1). Similarly, an m₂-th phase tooth in saw-tooth phase shift graphline φ′₂ maps a real phase shift for modulation frequency f₂ along phaseshift graph line φ₂ between a real phase shift equal to 2π(m₂−1) and areal phase shift less than 2πm₂ to an ambiguous wrapped phase shifthaving a wrapping number n=(m₂−1). It is noted that whereas real phaseshifts less than 2π are mapped to their real values by photosensor 22,they are in fact generally ambiguous because their values might havebeen generated by a real phase shift greater than 2π.

By way of example, real phase shift φ(132,f₁) shown along real phaseshift graph line φ₁ is mapped to wrapped phase shift φ′(132,f₁)indicated by a point along phase tooth m₁=2 (number 2 in a solid lineellipse) of saw-tooth phase shift graph line φ₁ by an open circle. Theopen circle is labeled, and its value indicated by φ′(132,f₁) shownalong phase shift axis 204. Similarly, real phase shift φ(132,f₂) shownalong real phase shift graph line φ₂ is mapped to wrapped phase shiftφ′(132,f₂) indicated by a point on phase tooth m₂=2 (number 2 in adashed line ellipse) of saw-tooth phase shift graph line φ′₂ by an opencircle. The open circle is labeled, and its value indicated byφ′(132,f₂) shown along phase shift axis 204. Real phase shifts φ(131,f₁)and φ(131,f₂) indicated by solid circles along real phase shift graphlines φ₁ and φ₂ are by way of example, equal to and coincident withtheir respective wrapped phase shifts φ′(131,f₁) and φ′(131,f₂) on phaseteeth m₁=1 of saw-tooth phase shift graph lines φ′₁ and φ′₂. Wrappedphase shifts φ′(131,f₁) and φ′(131,f₂) are therefore not distinguishedfrom real phase shifts φ(131,f₁) and φ(131,f₂) along phase shift graphlines φ′₁ and φ′₂.

Discretized indicator function,DIN(t_(R))=φ*(t_(R),f₁)−(f₁/f₂)φ*(t_(R),f₂) discussed above asoptionally used to unwrap wrapped phase shifts in accordance with anembodiment of the disclosure is shown as a function of t_(R) along roundtrip axis 202. Values for DIN(t_(R)) are indicated as being shown alongan ordinate DIN axis 205. DIN(t_(R)) may assume discrete step values,“DIN values”, for which a first DIN value is equal to zero andsubsequent DIN values alternate between positive and negative values.The positive DIN values and negative DIN values decrease monotonicallywith increasing t_(R) with a difference between sequential positive DINvalues and between sequential negative DIN values equal toΔφ=2π(f₂−f₁)/f₂.

For a ratio f₁/f₂=M/(M+1) where M is an integer, each of the DIN valuesis equal to a different integer multiple of Δφ. Each DIN value isassociated with only one tooth number m₁ and only one tooth number m₂.Some of the DIN values are labeled by their values, and each DIN valueshows, in a solid ellipse, a tooth number m₁ of the tooth in phase toothgraph line φ′₁ with which the DIN number is associated, and, in a dashedellipse, a tooth number m₂ of the tooth in phase tooth graph line φ′₂with which the DIN value is associated. Every tooth number m₁ insaw-tooth phase shift graph line φ′₁, up to and inclusive of maximumtooth number M₁ is associated with a different DIN value. Similarly,every tooth number m₂ in saw-tooth phase shift graph line φ′₂, up to andinclusive of maximum tooth number M₂ is associated with a different DINvalue.

By comparing a trial indicator for a given wrapped phase shift to DINvalues of DIN(t_(R)), in accordance with an embodiment of thedisclosure, CW-TOF camera 20 associates the wrapped phase shift with aparticular phase tooth number m₁ and a particular phase tooth number m₂.The phase tooth numbers m₁ and m₂ associated with the wrapped phaseshift provide wrapping numbers n₁=(m₁−1) and n₂=(m₂−1) for the wrappedphase shift for modulation frequency f₁ and modulation frequency f₂respectively.

For example, a possible value for trial indicator x₁₂(131) for feature131 determined from wrapped phase shifts φ′(131,f₁) and φ′(131,f₂) isshown along DIN axis 205. Wherein, as in FIG. 1A, x₁₂(131) is shownhaving a value larger than 0, the value of x₁₂(131) is closest to theDIN value of DIN(t_(R)) equal to zero, and processor 25 associatesx₁₂(131) with DIN(t_(R)) equal to zero for which m₁=m₂=1. As a result,processor 25 determines that both wrapped phase shifts φ′(131,f₁) andφ′(131,f₂) have their respective wrapping numbers n₁=(m₁−1) andn₂=(m₂−1) equal to zero. The processor may therefore determine adistance d(131) to feature 131 responsive to a distanced(131,f₁)=φ′(131,f₁)c/4πf₁ and/or a distance d(131,f₂)=φ′(131,f₂)c/4πf₂.Distance d(131) may for example be determined equal to a distanced(131,f₁) or d(131,f₂) having a smallest, estimated standard deviation,or average, or weighted average of the distances.

Similarly, processor 25 determines that x₁₂(132) schematically shownalong DIN axis 205, is closest to the DIN value of DIN(t_(R)) equal to−Δφ and associates x₁₂(132) with phase tooth number m₁=2 and m₂=2. Theprocessor may therefore determine that wrapped phase φ′(131,f₁) andwrapped phase φ′(131,f₂) have wrapping numbers equal to 1 and determinesa distance d(132) to feature 132 responsive to a distanced(131,f₁)=[φ′(132,f₁)+2π]c/4πf₁ and/or a distanced(132,f₂)=[φ′(132,f₂)+2π]c/4πf₁.

In an embodiment of the disclosure DIN(t_(R)) may be configured as aninteger function for which its DIN values are integer, for example, byquantizing [φ*(t_(R),f₁)−(f₁/f₂)φ*(t_(R),f₂)] with a quantization stepequal to Δφ, and definingDIN(t_(R))=nint([φ*(t_(R),f₁)−(f₁/f₂)φ*(t_(R),f₂)]/Δφ) where “nint” isthe nearest integer function. DIN(t_(R)) defined as an integer functionhas a maximum value equal to M₁ and positive and negative integer valuesthat decrease monotonically with t_(R) by units of one. An integerDIN(t_(R)) 230 corresponding to DIN(t_(R)) shown along round trip axis201 is shown along round trip axis 203. Processor 25 may use a trialinteger indicator to compare with integer DIN(t_(R)), in accordance withan embodiment of the disclosure, to determine wrapping numbers forwrapped phase shifts acquired by CW-TOF camera 20. An integer trialindicator for a k-th feature may be defined asIX₁₂(k)=nint[(x₁₂(k)/Δφ]=nint[(φ′(k,f₁)−(f₁/f₂)φ′(k,f₂))/Δφ].

An integer DIN(t_(R)) and integer trial function IX₁₂(k) may beadvantageous in performing calculations useful for determining wrappingnumbers in accordance with an embodiment of the disclosure. For example,if DIN(t_(R)) is an integer function, an integer value of IX₁₂(k) isequal to a DIN value for the k-th feature in scene 30 from whichcorresponding wrapping numbers for wrapped phase shifts acquired for thefeature may be determined.

It is noted that in the above examples, wrapped phase shifts for a samefeature 131 or 132 are described as having a same wrapping number.Wrapping numbers for wrapped phases acquired for modulation frequenciesf₁ and f₂ and a same feature do not of course have to be the same. Forexample, if processor 25 had determined from a value of trial indicatorx₁₂(132) that the trial indicator should be associated with DIN valueequal to (2π−2Δφ), the processor would have determined that wrappedphase φ′(132,f₁) is associated with phase tooth number 2 and thatwrapped phase φ′(132,f₂) is associated with phase tooth number 3. Theprocessor would have determined that wrapped phases φ′(132,f₁) andφ′(132,f₂) have wrapping numbers n₁=1 and n₂=2 respectively.

The discretized indicator function DIN(t_(R)) as noted above, and asshown in FIG. 1B is cyclical. The function has a repetition period equalto (2π/Δφ−1)T₁=(2π/Δφ)T₂, where T₁ and T₂ are periods of frequencies f₁and f₂ respectively, and a corresponding repetition frequency equal to abeat frequency, f_(B)=(f₂−f₁). CW-TOF camera 20 using light modulated atmodulation frequencies f₁ and f₂ and DIN(t_(R)) to determine distancesto features in scene 30 in accordance with an embodiment of thedisclosure, provides unambiguous phase shifts for features in scene 30located up to a maximum distance from the camera equal to c/2(f₂−f₁).The CW-TOF camera operates as if it illuminates the scene with lighthaving intensity modulated at a “virtual modulation frequency” equal tothe beat frequency f_(B) and provides unambiguous phase shifts for thevirtual modulation frequency for features in the scene located up to amaximum distance from the camera equal to c/2f_(B).

Whereas CW-TOF camera 20 is described above as illuminating a scene itimages with two light waves each of which is amplitude modulated at adifferent frequency, a CW-TOF camera in accordance with an embodiment ofthe disclosure is not limited to illuminating a scene with light that isamplitude modulated at only two frequencies. A CW-TOF camera inaccordance with an embodiment of the disclosure may illuminate a scenewith a plurality of more than two light waves, each of which has itsintensity modulated at a different modulation frequency. And the CW-TOFcamera may acquire and unwrap wrapped phase shifts for each of themodulation frequencies to determine distances to features in the scene.Optionally, a distance to a given feature in the scene may be a weightedaverage of distances to the feature provided responsive to unwrappedphase shifts for all or some of the modulation frequencies. In anembodiment of the disclosure if the plurality of modulation frequenciescomprises N different modulation frequencies, f_(n), 1≦n≦N, thefrequencies satisfy a relationship f_(n+1)=[(n+1)/n]f_(n).

Optionally, the CW-TOF camera unwraps wrapped phase shifts for eachmodulation frequency of the plurality of modulation frequenciesresponsive to DINs provided for wrapped phase shifts of pairs of themodulation frequencies. The CW-TOF may unwrap wrapped phase shifts for agiven modulation frequency of the light waves responsive to a DINdefined for the given modulation frequency and a virtual modulationfrequency determined for a pair of the modulation frequencies of thelight waves.

In an embodiment, the CW-TOF camera may unwrap wrapped phase shifts foreach of first and second pairs of the frequencies to provide first andsecond virtual modulation frequencies for the camera equal to beatfrequencies f_(B1) and f_(B2) respectively of the first and second pairsof frequencies. The first and second virtual modulation frequenciesf_(B1) and f_(B2) provide unambiguous phase shifts and correspondingunambiguous distances for features in the scene if the features arelocated at distances from the CW-TOF camera that are less than maximumunambiguous ranges c/2f_(B1) and c/2f_(B1) respectively. If the scenecomprises features at distances greater than the maximum unambiguousranges, unwrapped phase shifts provided by the CW-TOF camera aregenerally ambiguous, and may be considered to be wrapped virtual phaseshifts.

In an embodiment, the CW-TOF camera determines a DIN for virtual wrappedphase shifts for the first and second virtual modulation frequencies tounwrap and disambiguate the wrapped virtual phase shifts. The CW-TOFcamera appears to operate at a third virtual modulation frequency f_(B3)equal to a beat frequency of f_(B1) and f_(B2). The virtual modulationfrequency f_(B3) extends a maximum unambiguous range of the CW-TOFcamera to c/2f_(B3)=c/2/(|f_(B1)−f_(B2)|). Using a virtual modulationfrequency of a CW-TOF camera to determine another virtual modulationfrequency for the CW-TOF camera may be referred to as “cascading” thevirtual operating frequency.

Cascading virtual modulation frequencies may be performed by processor25 using any of various suitable processing architectures. For example,processor 25 may have an architecture configured to use a same digitalsignal processing (DSP) block to process wrapped phase shifts determinedfor first and second pairs of modulation frequencies, comprising anycombination of real and/or virtual modulation frequencies, and providewrapped virtual phase shifts for each of first and second virtualmodulation frequencies. The first and second virtual modulationfrequencies are beat frequencies of the first and second pairs ofmodulation frequencies respectively. The same DSP block may then be usedby processor 25 to process the wrapped virtual phase shifts of the firstand second virtual modulation frequencies to provide virtual phaseshifts for a third virtual modulation frequency, which is a beatfrequency of the first and second virtual modulation frequencies.Alternatively, processor 25 may comprise a tree configuration of DSPblocks for cascading virtual modulation frequencies. Each of first andsecond DSP blocks in the tree configuration processes phase shifts for adifferent pair of modulation frequencies comprising any combination ofreal and virtual modulation frequencies, to provide virtual phase shiftsfor first and second virtual modulation frequencies respectively. Thefirst and second DSP blocks transmit the phase shifts for the first andsecond virtual modulation frequencies that they respectively produce toa third, shared DSP block in the DSP tree. The third DSP block processesthe phase shifts it receives from the first and second DSP blocks togenerate virtual phase shifts for a third virtual modulation frequency.

In FIG. 1A and the discussion of CW-TOF 20, CW-TOF camera 20 appears tobe illuminating scene 30 with two separate beams 40 and 50 modulatedrespectively at frequencies f₁ and f₂, and might be considered toilluminate the scene sequentially, first with one and then with theother of the beams. Whereas a CW-TOF camera in accordance with anembodiment of the disclosure may illuminate a scene sequentially withlight waves modulated at different frequencies to acquire and unwrapphase shifts for each of a plurality of different modulation frequenciesto determine distance to features in the scene, practice of anembodiment of the disclosure is not limited to “sequentialillumination”. A CW-TOF camera in accordance with an embodiment of thedisclosure may for example, illuminate a scene simultaneously with lightmodulated at each of a plurality of different modulation frequenciesand/or with light simultaneously modulated at a plurality of differentmodulation frequencies to acquire wrapped phase shifts for each of themodulation frequencies and determine distances to features in the scene.To acquire wrapped phase shifts for each of the modulation frequencies,the camera may, by way of example, control pixels in at least onephotosensor comprised in the camera to simultaneously sample andregister reflected light from the scene at sampling frequencies equal toeach of the modulation frequencies and/or harmonics of the modulationfrequencies.

For example, assuming the CW-TOF camera is similar to CW-TOF camera 20and illuminates a scene simultaneously with light amplitude modulated atfrequencies f₁ and f₂ controller 24 may control each pixel in a pair ofadjacent pixels 23 in photosensor 22 to sample and register reflectedlight from the scene at a sampling frequency equal to a different one ofmodulation frequencies f₁ and f₂. The pixel sampling reflected light atfrequency f1 or f2 accumulates a quantity of photocharge responsive toreflected light that may be processed to provide wrapped phase shiftsfor modulation frequency f₁ or f₂ respectively.

FIG. 2 shows a flow diagram of a procedure 300 by which CW-TOF camera 20determines distances to features in scene 30 using light modulated atmodulation frequencies f₁ and f₂. Optionally, as in the examplesdescribed in FIGS. 1A and 1B, f₁/f₂=M/(M+1) and period of their beatfrequency is equal to M₁ periods of modulation frequency f₁ and M₂periods of modulation frequency f₂.

In a block 301 CW-TOF camera 20 illuminates scene 30 with lightmodulated at a modulation frequency f₁ to acquire an image the scenethat provides data for determining wrapped phase shifts for features inthe scene for modulation frequency f₁. In a block 303, CW-TOF camera 20optionally processes the data to provide wrapped phase shifts φ′(k,f₁)for features in the scene, where the index k identifies a k-th featurein the scene is imaged by the CW-TOF camera. Optionally, in a block 305,CW-TOF camera 20 illuminates scene 30 with light modulated at amodulation frequency f₂ to image the scene and provide data fordetermining wrapped phase shifts for features in the scene formodulation frequency f₂. In a block 307 the CW-TOF camera optionallyprocesses the data to provide wrapped phase shifts φ′(k,f₂).

In a block 309, CW-TOF camera 20 determines trial indicators x₁₂(k) forfeatures k in scene 30 optionally in accordance with an expressionx₁₂(k)=φ′(k,f₁)−(f₁/f₂)φ′(k,f₂) and in a block 311 may convert x₁₂(k) toan integer functionIX₁₂(k)=x₁₂(k)/Δφ=nint[(φ′(k,f₁)−(f₁/f₂)φ′(k,f₂))/Δφ].

In an embodiment of the disclosure, in a block 313 CW-TOF camera 20optionally processes trial indicator integer values IX₁₂(k) inaccordance with a homogenizing procedure, also referred to as a“homogenizer” (H), to remove outlier values. In an embodiment, index kis an integer belonging to a set of K consecutive integers for which anytwo consecutive integers differ by one, and for which any two indices kthat differ by one identify two features of scene 30 that optics 21images on adjacent regions of photosensor 22 (FIG. 1A). Optionally, afirst integer in the series of integers is equal to 1. In accordancewith the homogenizing procedure, CW-TOF camera 20 determines differencesΔIX₁₂(k)=IX₁₂(k)−IX₁₂(k−1) for 2≦k≦K. And for each k for which1≦k≦(K−1), determines a corrective bias equal toCB(k)=ΔIX₁₂(k+1)|ΔIX₁₂(k)| subject to the constraint that |CB(k)|≦1. Thecamera determines a “homogenized” trial integer indicatorIX₁₂(k)*=IX₁₂(k)+CB(k). The homogenizing procedure removes positive andnegative aberrant spikes in the values for IX₁₂(k) having magnitude 1.An aberrant spike is a value for IX₁₂(k) that differs from IX₁₂(k−1) andIX₁₂(k+1) by a same positive or a same negative difference. Whereas ahomogenized trial integer indicator IX₁₂(k)* or an unhomogenized trialinteger indicator IX₁₂(k) may be used, albeit with generally differenterror rates, to determine wrapping numbers n₁(k) and n₂(k) for wrappedphase shifts as discussed below, hereinafter IX₁₂(k)* is used, unlessindicated otherwise, as a generic reference to both IX₁₂(k)* and IX₁₂(k)

Optionally in a block 315, CW-TOF camera 20 determines wrapping numbersn₁(k) and n₂(k) for wrapped phase shifts φ′(k,f₁) and φ′(k,f₂). Any ofdifferent methods may be used to determine wrapping numbers n₁(k) andn₂(k). In an embodiment, CW-TOF camera 20 may have a look up table (LUT)optionally stored in processor 25 that associates values for IX₁₂(k)*with wrapping numbers n₁(k) and n₂(k). For example, for modulationfrequencies f₁ and f₂ as shown in FIG. 1B, for IX₁₂(k)*=(M₁−1) alonground trip time axis 203, a LUT in accordance with an embodiment of thedisclosure may provide m₁(k)=2 and m₂(k)=3 and corresponding wrappingnumbers n₁(k)=(m₁(k)−1)=1 and n₂(k)=(m₂(k)−1)=2.

In an embodiment, in block 315, CW-TOF camera 20 may calculate wrappingnumbers n₁(k) and n₂(k) IX₁₂(k)* from IX₁₂(k)*. For example, for a givenIX₁₂(k)* the CW-TOF camera may determine:N _(O)(k)=0.5[(sign(IX ₁₂(k)*)+1]IX ₁₂(k)*;n ₁(k)=M ₁[1−fix((M ₁ −N _(O)(k))/M ₁ ]−IX ₁₂(k)*; andn ₂(k)=M ₂[1−fix((M ₂ −N _(O)(k))/M ₂ ]−IX ₁₂(k)*.

In the expressions above the sign function takes the sign of itsargument and the fix function gives a nearest integer between itsargument and zero.

Optionally in a block 317, CW-TOF camera 20 determines unwrapped phaseshifts φ(k,f₁) and φ(k,f₂) in accordance with φ(k,f₁)=φ′(k,f₁)+2π n₁(k)and φ(k,f₂)=φ′(k,f₂)+2πn₁(k). Optionally, the CW-TOF camera determines atest ratio, TR(k)=φ(k,f₂)/φ(k,f₁) and uses TR(k) to provide a measure ofreliability of the unwrapped phase shifts. If a difference between TR(k)and its expected value f₂/f₂) is greater than a predetermined threshold,the unwrapped phase shifts may be considered unreliable measures oftheir corresponding real phase shifts φ*(k,f₁) and φ*(k,f₂) and bediscarded.

In a block 319 CW-TOF camera 20 may determine a distance to a k-thfeature in scene 30 responsive to at least one unwrapped phase shiftφ(k,f₁) and φ(k,f₂) that the camera determines for the feature. In anembodiment, CW-TOF camera 20 determines a weighted average Φ_(W)(k)optionally defined by an expression Φ_(W)(k)=ω₁φ(k,f₁)+ω₂f₁/f₂φ(k,f₂),where weights ω₁ and ω₂ sum to one, and are determined as functionserror in determining unwrapped phase shifts φ(k,f₁) and φ(k,f₂).

There is therefore provided in accordance with an embodiment of thedisclosure a continuous wave time of flight (CW-TOF) camera operable todetermine distances to features in a scene, the CW-TOF cameracomprising: a light source configured to transmit light modulated atfirst and second frequencies f₁ and f₂ to illuminate the scene; aphotosensor configured to register amounts of light reflected byfeatures in the scene from the transmitted light modulated at each ofthe first and second modulation frequencies; and a processor configuredto process amounts of reflected light from a k-th feature in the sceneregistered by the photosensor to provide wrapped phase shifts forfrequencies f₁ and f₂ and a trial indicator for wrapping numbers of thewrapped phase shifts responsive to the wrapped phase shifts, and unwrapat least one of the wrapped phase shifts responsive to the trialindicator and a piecewise constant or linear discretized indicator (DIN)function of frequencies f₁ and f₂ and a round trip time t_(R) for lightfrom and back to the camera for the k-th feature.

Optionally, the DIN function is discontinuous at boundaries of domainsof adjacent pieces of the function. Additionally or alternatively theDIN function optionally comprises a linear sum of the form(αφ*(t_(R),f₁)−βφ*(t_(R),f₂)) where φ*(t_(R),f₁) and φ*(t_(R),f₂) aretheoretical phase shifts for frequencies f₁ and f₂ respectively asfunctions of t_(R). Optionally, the trial indicator for the k-th featurecomprises a linear sum of the wrapped phase shifts of the form(γφ′(k,f₁)−ηφ′(k,f₂)), where φ′(k,f₁) and φ′ (k,f₂) are the wrappedphase shifts for frequencies f₁ and f₂ respectively. Optionally α=γ andβ=η. Optionally, the absolute value |α/β|=f₂/f₁.

In an embodiment of the disclosure, each modulation frequency f₁ and f₂is equal to an integer multiple of a same frequency. Optionally, a ratiobetween a lower modulation frequency and a higher modulation frequencyof the frequencies f₁ and f₂ is equal to M/(M+1), where M is an integer.

In an embodiment of the disclosure, the DIN function is an integerfunction having discrete integer values. Optionally, the discreteinteger values are equal to the linear sum quantized by a quantizationstep equal to 2π|(f₂−f₁)|/f₂. The trial indicator may be equal to aninteger. Optionally, the integer is equal to the linear sum of thewrapped phase shifts quantized by a quantization step equal to2π|(f₂−f₁)|/f₂.

In an embodiment the processor is configured to determine if the trialindicator integer is an outlier, and if so modify the integer. If IX(k)represents the trial indicator integer for the k-th feature and IX(k−1)and IX(k+1) the trial indicator integer values for features adjacent toand on opposite sides of the k-th feature, IX(k) is optionallydetermined an outlier if [IX(k)−IX(k−1)]=−[IX(k+1)−IX(k)] and|(IX(k)−IX(k−1)|=1. Optionally, if IX(k) is determined to be an outlier,the processor modifies IX(k) by adding to IX(k) a sum equal to[IX(k+1)−IX(k)]·|(IX(k)−IX(k−1)|.

In an embodiment of the disclosure, the light source is configured toselectively transmit light at a plurality of different modulationfrequencies greater than two and the processor is configured to: processamounts of reflected light from the k-th feature in the scene registeredby the photosensor to determine wrapped phase shifts for each frequencyof first and second pairs of different frequencies of the plurality offrequencies; determine a trial indicator for each first and second pairof frequencies responsive to the wrapped phase shifts determined for thepair of frequencies; unwrap at least one wrapped phase shift determinedfor each pair of frequencies responsive to the determined trialindicator and a DIN function for the pair; determine a first virtualwrapped phase shift for a first virtual modulation frequency equal to abeat frequency of the frequencies in the first pair of frequencies and asecond virtual wrapped phase shift for a second virtual modulationfrequency equal to a beat frequency of the frequencies in the secondpair of frequencies; determine a trial indicator for the first andsecond virtual wrapped phase shifts; and unwrap at least one of thefirst and second virtual wrapped phase shifts responsive to thedetermined trial indicator and a DIN function for the first and secondvirtual modulation frequencies.

There is further provided in accordance with an embodiment of thedisclosure a method of unwrapping a wrapped phase shift for lightreflected by a feature in a scene from light transmitted to illuminatethe scene, the method comprising: transmitting light modulated at firstand second frequencies f₁ and f₂ to illuminate the scene; registeringamounts of light reflected by the feature from the transmitted lightmodulated at each of the first and second frequencies; processingamounts of reflected light from the feature to provide wrapped phaseshifts for frequencies f₁ and f₂; determining a value for a trialindicator for wrapping numbers of the wrapped phase shifts responsive tothe provided wrapped phase shifts; and determining a wrapping number forreflected light for at least one of the modulation frequenciesresponsive to the value of the trial indicator and a piecewise constantor linear, discretized indicator (DIN) function of frequencies f₁ and f₂and a round trip time t_(R) for light from and back to the camera forthe feature.

Optionally, the DIN function comprises a linear sum of the form(αφ*(t_(R),f₁)−βφ*(t_(R),f₂)) where φ*(t_(R),f₁) and φ*(t_(R),f₂) aretheoretical phase shifts for frequencies f₁ and f₂ respectively asfunctions of t_(R), and α and β are positive constants. The trialindicator for the feature may comprise a linear sum of the wrapped phaseshifts of the form (γφ′(k,f₁)−ηφ′(k,f₂)), where φ′(k,f₁) and φ′(k,f₂)are the wrapped phase shifts for frequencies f₁ and f₂ respectively, andγ and η are positive constants. Optionally, α=γ and β=η and |α/β|=f₂/f₁.

There is further provided in accordance with an embodiment of thedisclosure a method of determining a distance to a feature in a scene,the method comprising: determining wrapped phase shifts for light thatis reflected from the feature and is amplitude modulated at at least twomodulation frequencies f₁ and f₂; determining a wrapping number forreflected light for at least one of the modulation frequencies f₁ and f₂responsive to a piecewise constant or linear, discretized indicator(DIN) function of frequencies f₁ and f₂; and determining a distance tothe feature responsive to the wrapping number. And there is optionallyprovided a TOF camera that uses the method to determine the distance tothe feature.

In the description and claims of the present application, each of theverbs, “comprise” “include” and “have”, and conjugates thereof, are usedto indicate that the object or objects of the verb are not necessarily acomplete listing of components, elements or parts of the subject orsubjects of the verb.

Descriptions of embodiments of the disclosure in the present applicationare provided by way of example and are not intended to limit the scopeof the disclosure. The described embodiments comprise differentfeatures, not all of which are required in all embodiments. Someembodiments utilize only some of the features or possible combinationsof the features. Variations of embodiments of the disclosure that aredescribed, and embodiments comprising different combinations of featuresnoted in the described embodiments, will occur to persons of the art.The scope of the invention is limited only by the claims.

The invention claimed is:
 1. A continuous wave time of flight (CW-TOF)camera operable to determine distances to features in a scene, theCW-TOF camera comprising: a light source configured to transmit lightmodulated at first and second frequencies f₁ and f₂ to illuminate thescene; a photosensor configured to register amounts of light reflectedby features in the scene from the transmitted light modulated at each ofthe first and second modulation frequencies; and a processor configuredto process amounts of reflected light from a k-th feature in the sceneregistered by the photosensor to provide wrapped phase shifts forfrequencies f₁ and f₂ and a trial indicator for wrapping numbers of thewrapped phase shifts responsive to the wrapped phase shifts, and unwrapat least one of the wrapped phase shifts responsive to the trialindicator and a piecewise constant or linear discretized indicator (DIN)function of frequencies f₁ and f₂ and a round trip time t_(R) for lightfrom and back to the camera for the k-th feature.
 2. The CW-TOF cameraaccording to claim 1 wherein the DIN function is discontinuous atboundaries of domains of adjacent pieces of the function.
 3. The CW-TOFcamera according to claim 2 wherein the DIN function comprises a linearsum of the form (αφ*(t_(R),f₁)−βφ*(t_(R),f₂)) where φ*(t_(R),f₁) andφ*(t_(R),f₂) are theoretical phase shifts for frequencies f₁ and f₂respectively as functions of t_(R).
 4. The CW-TOF camera according toclaim 3 wherein the trial indicator for the k-th feature comprises alinear sum of the wrapped phase shifts of the form(γφ′(k,f₁)−ηφ′(k,f₂)), where φ′(k,f₁) and φ′ (k,f₂) are the wrappedphase shifts for frequencies f₁ and f₂ respectively.
 5. The CW-TOFcamera according to claim 4 wherein β=γ and β=η.
 6. The CW-TOF cameraaccording to claim 3 wherein the absolute value |α/β|=f₂/f₁.
 7. TheCW-TOF camera according to claim 6 wherein each modulation frequency f₁and f₂ is equal to an integer multiple of a same frequency.
 8. TheCW-TOF camera according to claim 7 wherein a ratio between a lowermodulation frequency and a higher modulation frequency of thefrequencies f₁ and f₂ is equal to M/(M+1), where M is an integer.
 9. TheCW-TOF camera according to claim 5 wherein the DIN function is aninteger function having discrete integer values.
 10. The CW-TOF cameraaccording to claim 9 wherein the discrete integer values are equal tothe linear sum quantized by a quantization step equal to 2π|(f₂−f₁)|/f₂.11. The CW-TOF camera according to claim 10 wherein the trial indicatoris equal to an integer.
 12. The CW-TOF camera according to claim 11wherein the integer is equal to the linear sum of the wrapped phaseshifts quantized by a quantization step equal to 2π|(f₂−f₁)|/f₂.
 13. TheCW-TOF camera according to claim 11 wherein the processor is configuredto determine if the trial indicator integer is an outlier, and if somodify the integer.
 14. The CW-TOF camera according to claim 13 whereinif IX(k) represents the trial indicator integer for the k-th feature andIX(k−1) and IX(k+1) the trial indicator integer values for featuresadjacent to and on opposite sides of the k-th feature, IX(k) is anoutlier if [IX(k)−IX(k−1)]=−[IX(k+1)−IX(k)] and |(IX(k)−IX(k−1)|=1. 15.The CW-TOF camera according to claim 13 wherein if IX(k) is determinedto be an outlier, the processor modifies IX(k) by adding to IX(k) a sumequal to [IX(k+1)−IX(k)]·|(IX(k)−IX(k−1)|.
 16. The CW-TOF cameraaccording to claim 1, wherein the light source is configured toselectively transmit light at a plurality of different modulationfrequencies greater than two and the processor is configured to: processamounts of reflected light from the k-th feature in the scene registeredby the photosensor to determine wrapped phase shifts for each frequencyof first and second pairs of different frequencies of the plurality offrequencies; determine a trial indicator for each first and second pairof frequencies responsive to the wrapped phase shifts determined for thepair of frequencies; unwrap at least one wrapped phase shift determinedfor each pair of frequencies responsive to the determined trialindicator and a DIN function for the pair; determine a first virtualwrapped phase shift for a first virtual modulation frequency equal to abeat frequency of the frequencies in the first pair of frequencies and asecond virtual wrapped phase shift for a second virtual modulationfrequency equal to a beat frequency of the frequencies in the secondpair of frequencies; determine a trial indicator for the first andsecond virtual wrapped phase shifts; and unwrap at least one of thefirst and second virtual wrapped phase shifts responsive to thedetermined trial indicator and a DIN function for the first and secondvirtual modulation frequencies.
 17. A method of determining a distanceto a feature in a scene, the method comprising: determining wrappedphase shifts for light that is reflected from the feature and isamplitude modulated at at least two modulation frequencies f₁ and f₂;determining a wrapping number for reflected light for at least one ofthe modulation frequencies f₁ and f₂ responsive to a piecewise constantor linear, discretized indicator (DIN) function of frequencies f₁ andf₂; and determining a distance to the feature responsive to the wrappingnumber.
 18. The method according to claim 17 wherein the DIN functioncomprises a linear sum of the form (φα*(t_(R),f₁)−βφ*(t_(R),f₂)) whereφ*(t_(R),f₁) and φ*(t_(R),f₂) are theoretical phase shifts forfrequencies f₁ and f₂ respectively as functions of t_(R), and α and βare constants.
 19. The method according to claim 18 wherein determiningthe wrapping number comprises comparing a trial indicator for thefeature with the DIN function, wherein the trial indicator is equal to alinear sum of the wrapped phase shifts of the form(γφ′(k,f₁)−ηφ′(k,f₂)), where φ′(k,f₁) and φ′(k,f₂) are the wrapped phaseshifts for frequencies f₁ and f₂ respectively, and γ and η are positiveconstants.
 20. The method according to claim 18 wherein α=γ and β=η and|α/β|=f₂/f₁.